package com.chaos.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chaos.framework.model.entity.IdModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 *
 * @author Jacky.Cui
 * @since 2024-11-22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper =false)
@Accessors(chain = true)
@TableName("t_order")
@ApiModel(value="TOrder实体", description="订单表")
public class TOrder extends IdModel {


    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;


    @ApiModelProperty(value = "订单状态 1: 未支付 2:已支付")
    @TableField("status")
    private Integer status;


    @ApiModelProperty(value = "总金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;


    @ApiModelProperty(value = "实付金额")
    @TableField("pay_amount")
    private BigDecimal payAmount;


    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;


    @ApiModelProperty(value = "订单来源：1，微信小程序；2，支付宝小程序；3，高德小程序 ")
    @TableField("channel")
    private Integer channel;


    @ApiModelProperty(value = "支付方式：1，支付宝；2，微信；3，余额账户；")
    @TableField("pay_type")
    private Integer payType;


    @ApiModelProperty(value = "支付时间")
    @TableField("pay_time")
    private LocalDateTime payTime;


    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;


}
